#include<stdio.h>
#define N 1000
int arr[N];

void insertion_Sort(int arr[],int n){
	for(int i=0;i<n-1;++i){
		int end=i;
		int tmp=arr[end+1];
		while(end>=0){
			if(tmp<arr[end]){
				arr[end+1]=arr[end];
				--end;
			}
			else{break;}
			}
			arr[end+1]=tmp;
		} 
	}

void Print(int* arr,int n){
	for(int i=0;i<n;i++){
		printf("%d ",arr[i]);
	}
}
int main(){
	 int n, i;
 scanf_s("%d", &n);
 for (i = 0; i < n; ++i) {
     scanf_s("%d", &arr[i]);
 }
 insertion_Sort(arr, n);
 Print(arr, n);
	return 0;
} 
